<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>


		<title>列表</title>

	</head>

	<body>
		<table align="center" cellpadding="50">
	<c:if test="${foodType<6}">
			<tr>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=1">
						黔菜类</a>
				</td>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=2">汤菜</a>
				</td>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=3"> 火锅</a>
				</td>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=4"> 面食</a>
				</td>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=5"> 糕点</a>
				</td>
			</tr>
	</c:if>
	<c:if test="${foodType>5}">
		<tr>
		<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=7">
						美酒</a>
				</td>
				<td>
					<a href="food_getTypedFoodListByFoodType.action?foodType=8">香茶</a>
				</td>
		</tr>
	</c:if>
		</table>
		<table border="0" cellpadding="5" align="center">
			<tr align="center">
				<td>
					序号
				</td>
				<td>
					名字
				</td>
				<td>
					图片
				</td>
				<td>
					添加时间
				</td>
				<td>
					主页显示权重
				</td>
				<td>
					次页显示权重
				</td>
				<td>
					类别
				</td>
				<td>
					操作
				</td>
			</tr>
			<c:forEach items="${foodList}" var="food" varStatus="status">
				<tr align="center">
					<td>
						${status.count}
					</td>
					<td>
						${food.name}
					</td>
					<td>
						<img alt="" src="${staticWebsite}${food.imageUrl}" width="100"
							height="60" />
					</td>
					<td>&nbsp;
						<fmt:formatDate value="${food.addFoodTime}" pattern="yyyy年MM月dd日" />
					</td>
					<td>
						${food.isShowInMain}
					</td>
					<td>
						${food.isShowInSecond}
					</td>
					<td>
						${food.foodTypeName}
					</td>
					<td>
						<a
							href="food_deleteOneFood.action?foodType=${foodType}&&foodId=${food.foodId}"
							onclick=
	return confirm('确认删除?');;
> 删除</a> |
						<a
							href="food_toUpdateFoodPage.action?foodType=${foodType}&&foodId=${food.foodId}">编辑</a>
					</td>
				</tr>
			</c:forEach>


		</table>
	</body>
</html>
